package org.example.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.CacheNamespace;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;
import org.example.bean.User;
import org.springframework.stereotype.Service;

/**
 * @Auther:Liu
 * @Testname:UserMapper
 * @Date:2025/8/5 11:29
 */
@CacheNamespace
@Mapper
public interface UserMapper extends BaseMapper<User> {

    @Select("Select count(0) from user where username=#{username}")
    int findUserNameCount(String username);

    @Select("Select count(0) from user where phone=#{phone}")
    int findUserPhoneCount(String phone);

    @Select("Select count(0) from user where email=#{email}")
    int findUserEmailCount(String email);
}
